package org.pf.base.pfGraphics.staff
{
	import flash.display.Sprite;
	import org.farmcode.bezier.Path;
	import org.pf.base.pfBlocks.PFCache;
	import org.pf.base.pfSystem.PFSystemCache;
	import org.pf.interfaces.IPFCache;
	import org.pf.PFPrince;
	import org.pf.interfaces.IPFSystemCache;
	
	/**
	 * ...
	 * @author zeksa'
	 */
	public class DrawRopes
	{
		public static function draw(cache:IPFCache,systemCache:IPFSystemCache):void
		{
			var path:Path = cache.bezierPath;
			var container:Sprite = PFPrince.getPrince().get_SystemCache().layers.viewLayer;
			var points:Array=new Array();
			container.graphics.clear();
			container.graphics.lineStyle(5, 0x000000);
			for (var i:int = 0; i < cache.ropes.length; i++)
			{
				for (var j:int = 0; j < cache.ropes[i][1].length; j++)
				{
					points[j]=cache.ropes[i][1][j];
				}
				path.points = points;
				container.graphics.moveTo(points[0].x, points[0].y);
				path.drawInto(container.graphics);
			}
		}
	
	}

}